<?php /* Smarty version 3.1.27, created on 2017-04-16 15:23:15
         compiled from "templates\pro_list.html" */ ?>
<?php
/*%%SmartyHeaderCode:2939058f31be3dbff55_91210699%%*/
if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'b4718076793cd74cb532e24555186fda29fdd2d7' => 
    array (
      0 => 'templates\\pro_list.html',
      1 => 1492327347,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '2939058f31be3dbff55_91210699',
  'variables' => 
  array (
    'pro_list' => 0,
    'item' => 0,
  ),
  'has_nocache_code' => false,
  'version' => '3.1.27',
  'unifunc' => 'content_58f31be3edd211_56382381',
),false);
/*/%%SmartyHeaderCode%%*/
if ($_valid && !is_callable('content_58f31be3edd211_56382381')) {
function content_58f31be3edd211_56382381 ($_smarty_tpl) {

$_smarty_tpl->properties['nocache_hash'] = '2939058f31be3dbff55_91210699';
?>
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>在线预订 - 农夫乐园官网</title>
    <meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">
    <meta content="yes" name="apple-mobile-web-app-capable" />
    <meta content="black" name="apple-mobile-web-app-status-bar-style" />
    <meta content="telephone=no" name="format-detection" />
    <link href="static/css/css_2.css" rel="stylesheet" type="text/css" />
    <link href="static/css/iconfont.css" rel="stylesheet" type="text/css" />
    
</head>
<body class="mb90">

<?php echo $_smarty_tpl->getSubTemplate ("banner.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0);
?>
    

<h3 class="n f14 intro_about_tit f16 bgwh"><i class="iconfont">&#xe60e;</i>在线预订</h3>
<div class="mall mt15">
        <?php
$_from = $_smarty_tpl->tpl_vars['pro_list']->value;
if (!is_array($_from) && !is_object($_from)) {
settype($_from, 'array');
}
$_smarty_tpl->tpl_vars['item'] = new Smarty_Variable;
$_smarty_tpl->tpl_vars['item']->_loop = false;
foreach ($_from as $_smarty_tpl->tpl_vars['item']->value) {
$_smarty_tpl->tpl_vars['item']->_loop = true;
$foreach_item_Sav = $_smarty_tpl->tpl_vars['item'];
?>
            <div class="mall_box">
                <dl class="rel">
                    <dt>
                        <strong class="n g0 db f16"><?php echo $_smarty_tpl->tpl_vars['item']->value['product_name'];?>
</strong>
                                <span class="f12 db mt5">优惠价：<em class="fo b">￥<?php echo $_smarty_tpl->tpl_vars['item']->value['product_price'];?>
</em><span class="ml15 gb">市场价：￥<?php echo $_smarty_tpl->tpl_vars['item']->value['product_disc'];?>
</span></span>
                    </dt>
                    <dd class="abs fa_wh">
                        <a href="#" onclick="Buy(<?php echo $_smarty_tpl->tpl_vars['item']->value['product_id'];?>
,'<?php echo $_smarty_tpl->tpl_vars['item']->value['product_name'];?>
',1,100)" class="buy_btn">购买 </a>
                    </dd>
                </dl>

                <div class="mall_tips">
                    <div class="mall_tips_text" style="display:none;">
                         <?php echo $_smarty_tpl->tpl_vars['item']->value['product_content'];?>

                    </div>
                    <span class="db tc f12 g6 mall_tips_open">查看门票说明</span>
                </div>
            </div>
        <?php
$_smarty_tpl->tpl_vars['item'] = $foreach_item_Sav;
}
?>

</div>


<div class="wap_bg" style="display: none;"></div>

<form action="order.php" method="get">
    <input type="hidden" name="ProductID" id="ProductID" />
    <div class="mall_quantity" style="display: none;">
        <h4 class="n g6 f14 tc mb15" id="name"></h4>
        <div class="mall_quantity_val flx">
            <span id="down"><i class="iconfont">&#xe612;</i></span>
            <input type="text" name="Number" id="Number" class="txt" value="1" />
            <span id="up"><i class="iconfont">&#xe611;</i></span>
        </div>
        <div class="mall_quantity_btn flx">
            <a href="#" class="mall_quantity_cancel">取消</a>
            <a href="#" class="mall_quantity_confirm f_wh">确认</a>
        </div>
    </div>
</form>

<?php echo $_smarty_tpl->getSubTemplate ("nav.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0);
?>
    

<?php echo '<script'; ?>
 src="static/js/jquery-1.8.2.min_1.js" type="text/javascript"><?php echo '</script'; ?>
>
<?php echo '<script'; ?>
 type="text/javascript" src="static/js/swipe.js"><?php echo '</script'; ?>
>
<?php echo '<script'; ?>
 type="text/javascript" src="static/js/app.js"><?php echo '</script'; ?>
>
    
    <?php echo '<script'; ?>
>
        var min = 1;
        var max = 100;
        $(document).ready(function () {
            $(".mall_quantity_confirm").bind("click", function () {
                var number =parseInt($('input[name="Number"]').val()); 
                if(number <min) {
                    alert("最小预定量是"+min);
                    $('input[name="Number"]').val(min);
                    return false;
                } 
                if(number >max) {
                    alert("最大预定量是"+max);
                    $('input[name="Number"]').val(number);
                    return false;
                } 
                $("form").submit();
            });  
            $("#down").bind("click", function () {
                var number =parseInt($('input[name="Number"]').val());               
                if (number > 1) {
                    number--;
                    if(number <min) {
                        number =min;
                    } 
                    $('input[name="Number"]').val(number);                 
                }
            });
            $("#up").bind("click", function () {
                var number =parseInt($('input[name="Number"]').val());
                number++
                if(number >max) {
                    number =max;
                } 
                $('input[name="Number"]').val(number);  
            });
        });
        function Buy(id, name, minBuy, maxBuy) {
            min = minBuy;
            max = maxBuy;
            $(".wap_bg").show();
            $(".mall_quantity").show();
            $("#name").html("选择 "+name+" 张数");
            $("#ProductID").val(id);
        }
    <?php echo '</script'; ?>
>
    

</body>
</html><?php }
}
?>